package com.gcc.SpringBootDemo;

import org.springframework.web.bind.annotation.*;

@RestController
public class HelloController {
    @GetMapping("/hello")
    public HelloResponse hello() {
        return new HelloResponse("Hello World!");
    }
    @PostMapping("/hello")
        public HelloResponse helloPost(@RequestBody HelloRequest  request) {
        String name = request.getName();
            return new HelloResponse("Hello" + name + "!");
        }
}